x86/mm: Fix memory-sharing code's locking discipline.
authorTim Deegan <Tim.Deegan@citrix.com>
Thu, 2 Jun 2011 12:16:52 +0000 (13:16 +0100)
committerTim Deegan <Tim.Deegan@citrix.com>
Thu, 2 Jun 2011 12:16:52 +0000 (13:16 +0100)
commit50407c8653481a0603fa162e77ab59d1fc21c2e3
treefe18cb221289d1c2aad7a26d030a794d5e34ee37
parent2e11350a2c29344ca372d98b5136e105bc0631de
x86/mm: Fix memory-sharing code's locking discipline.

memshr_audit is sometimes called with the shr_lock held.  Make it so for
every call.

Move the unsharing loop in p2m_teardown out of the p2m_lock to avoid
deadlocks.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen/arch/x86/mm/mem_sharing.c
xen/arch/x86/mm/p2m.c